import numpy as np

arr1 = np.arange(1, 5).reshape(2, 2)
arr2 = np.arange(5, 9).reshape(2, 2)

# 横向连接，需保证行数相等，两个数组
arr1_h_arr2 = np.hstack((arr1, arr2))
# 横向连接，需保证列数相等，两个数组
arr1_v_arr2 = np.vstack((arr1, arr2))
print()